$(document).ready(function() {
  $('#slides').cycle({
    prev: '#previous_slide',
    next: '#next_slide',
    timeout: 5000,
    pause: 1,
	before: changeTitle
  });
});

function changeTitle() {
  $('#slide_title').html(this.alt);
};